package com.ruoyi.stock2.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock2.mapper.FasttextTrainMapper;
import com.ruoyi.stock2.domain.FasttextTrain;
import com.ruoyi.stock2.service.IFasttextTrainService;
import com.ruoyi.common.core.text.Convert;

/**
 * 准备训练集Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-17
 */
@Service
public class FasttextTrainServiceImpl implements IFasttextTrainService 
{
    @Autowired
    private FasttextTrainMapper fasttextTrainMapper;

    /**
     * 查询准备训练集
     * 
     * @param id 准备训练集ID
     * @return 准备训练集
     */
    @Override
    public FasttextTrain selectFasttextTrainById(Long id)
    {
        return fasttextTrainMapper.selectFasttextTrainById(id);
    }

    /**
     * 查询准备训练集列表
     * 
     * @param fasttextTrain 准备训练集
     * @return 准备训练集
     */
    @Override
    public List<FasttextTrain> selectFasttextTrainList(FasttextTrain fasttextTrain)
    {
        return fasttextTrainMapper.selectFasttextTrainList(fasttextTrain);
    }

    /**
     * 新增准备训练集
     * 
     * @param fasttextTrain 准备训练集
     * @return 结果
     */
    @Override
    public int insertFasttextTrain(FasttextTrain fasttextTrain)
    {
        return fasttextTrainMapper.insertFasttextTrain(fasttextTrain);
    }

    /**
     * 修改准备训练集
     * 
     * @param fasttextTrain 准备训练集
     * @return 结果
     */
    @Override
    public int updateFasttextTrain(FasttextTrain fasttextTrain)
    {
        return fasttextTrainMapper.updateFasttextTrain(fasttextTrain);
    }

    /**
     * 删除准备训练集对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFasttextTrainByIds(String ids)
    {
        return fasttextTrainMapper.deleteFasttextTrainByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除准备训练集信息
     * 
     * @param id 准备训练集ID
     * @return 结果
     */
    @Override
    public int deleteFasttextTrainById(Long id)
    {
        return fasttextTrainMapper.deleteFasttextTrainById(id);
    }
}
